package com.longcai.cm.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.longcai.cm.excel.anno.ExcelExport;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author LBX
 * @since 2024-07-30
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("ja_order")
@ApiModel(value = "JaOrder对象", description = "订单表")
public class JaOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("用户id")
    @TableField("member_id")

    private Integer memberId;

    @ApiModelProperty("订单号")
    @TableField("order_num")
    @ExcelExport(value = "订单号",sort = 1)
    private String orderNum;

    @ApiModelProperty("订单类型 1团购 2秒杀 3团券 4VIP")
    @TableField("order_type")
    @ExcelExport(value = "订单类型",sort = 2,kv = "1-团购;2-秒杀;3-团券;4-VIP")
    private Integer orderType;

    @ApiModelProperty("门店id")
    @TableField("shop_id")
    private String shopId;

    @ApiModelProperty("商品id")
    @TableField("good_id")
    private String goodId;

    @ApiModelProperty("门店名称")
    @TableField("shop_name")
    @ExcelExport(value = "门店名称",sort = 3)
    private String shopName;

    @ApiModelProperty("商品名称")
    @TableField("good_name")
    @ExcelExport(value = "商品名称")
    private String goodName;

    @ApiModelProperty("商品图片")
    @TableField("good_img")
    @ExcelExport(value = "商品图片")
    private String goodImg;

    @ApiModelProperty("订单状态 0待支付 1待使用 2待评价 3已完成 4已取消 5退款")
    @TableField("order_status")
    @ExcelExport(value = "订单状态", sort = 4,kv = "0-待支付;1-待使用;2-待评价;3-已完成;4-已取消;5-退款")
    private Integer orderStatus;

    @ApiModelProperty("结算状态 1已结算 0未结算")
    @TableField("check_status")
    @ExcelExport(value = "结算状态", sort = 4,kv = "0-未结算;1-已结算;")
    private Integer checkStatus;

    @ApiModelProperty("订单价格")
    @TableField("order_amount")
    @ExcelExport(value = "订单价格",sort = 5)
    private BigDecimal orderAmount;

    @ApiModelProperty("支付金额")
    @TableField("pay_amount")
    @ExcelExport(value = "支付金额",sort = 6)
    private BigDecimal payAmount;

    @ApiModelProperty("支付时间")
    @TableField("pay_time")
    @ExcelExport(value = "支付时间",sort = 7)
    private String payTime;

    @ApiModelProperty("支付方式 1微信2支付宝")
    @TableField("pay_type")
    @ExcelExport(value = "支付方式",sort = 8,kv = "1-微信;2-支付宝")
    private Integer payType;

    @ApiModelProperty("优惠金额")
    @TableField("reduce_amount")
    @ExcelExport(value = "优惠金额",sort = 9)
    private BigDecimal reduceAmount;

    @ApiModelProperty("积分优惠金额")
    @TableField("reduce_amount_integral")
    private BigDecimal reduceAmountIntegral;

    @ApiModelProperty("券优惠金额")
    @TableField("reduce_amount_coupon")
    private BigDecimal reduceAmountCoupon;

    @ApiModelProperty("积分使用")
    @TableField("integral")
    @ExcelExport(value = "积分使用",sort = 10)
    private Integer integral;

    @ApiModelProperty("优惠券id")
    @TableField("coupon_id")
    private String couponId;

    @ApiModelProperty("微信订单id")
    @TableField("transition_id")
    private String transitionId;

    @ApiModelProperty("下单时间")
    @TableField("create_time")
    @ExcelExport(value = "下单时间",sort = 11)
    private String createTime;

    @ApiModelProperty("过期时间")
    @TableField("expire_time")
    @ExcelExport(value = "过期时间",sort = 12)
    private String expireTime;

    @ApiModelProperty("核销时间")
    @TableField("use_time")
    @ExcelExport(value = "核销时间",sort = 13)
    private String useTime;

    @ApiModelProperty("核销人姓名")
    @TableField("check_username")
    @ExcelExport(value = "核销人姓名",sort = 14)
    private String checkUsername;

    @ApiModelProperty("核销人id")
    @TableField("check_user_id")
    @ExcelExport("订单号")
    private Integer checkUserId;

    @ApiModelProperty("联系电话")
    @TableField("contact_mobile")
    @ExcelExport(value = "联系电话",sort = 15)
    private String contactMobile;

    @ApiModelProperty("预计使用时间")
    @TableField("expect_service_time")
    @ExcelExport(value = "预计使用时间",sort = 16)
    private String expectServiceTime;

    @ApiModelProperty("备注信息")
    @TableField("remark")
    @ExcelExport(value = "备注信息",sort = 17)
    private String remark;

    @ApiModelProperty("取消原因")
    @TableField("cancel_reason")
    @ExcelExport(value = "取消原因",sort = 18)
    private String cancelReason;

    @ApiModelProperty("订单利润")
    @TableField("order_profit")
    @ExcelExport(value = "订单利润",sort = 19)
    private BigDecimal orderProfit;

    @ApiModelProperty("订单应付(计算方式：订单实际支付金额 - 平台佣金 - 手续费（微信支付宝）)")
    @TableField("order_payable")
    @ExcelExport(value = "订单应付",sort = 20)
    private BigDecimal orderPayable;


}
